import request from '@/utils/request'

export function createDirectory(data) {
  return request({
    url: '/directory',
    method: 'post',
    data
  })
}
export function updaDirectory(data) {
  return request({
    url: '/directory',
    method: 'put',
    data
  })
}
export function deleteDirectory(id) {
  return request({
    url: '/directory/' + id,
    method: 'delete'
  })
}

export function detailDirectory(id) {
  return request({
    url: '/directory/' + id + '/detail',
    method: 'get'
  })
}
// 获取文件列表
export function getFileList(data) {
  return request({
    url: '/directory/getFileList',
    method: 'get',
    params: data
  })
}

export function directoryTreeList() {
  return request({
    url: '/directory/tree',
    method: 'get'
  })
}
export function shareFile(id) {
  return request({
    url: '/directory/share/' + id,
    method: 'get'
  })
}
